﻿using RemoteSensingImageDirectServer.Models.Map.Cache;
using RemoteSensingImageDirectServer.Untils.LRU;

namespace RemoteSensingImageDirectServer.Service.LRU
{
    public interface IRasterMapLink : IDisposable
    {
        /// <summary>
        /// 获取图源节点
        /// </summary>
        /// <param name="key">图源节点关键词</param>
        /// <returns></returns>
        IRasterMapNode? Get(string key);

        /// <summary>
        /// 创建图源节点并返回图源节点
        /// </summary>
        /// <param name="key">图源节点关键词</param>
        /// <param name="filename">数据源路径</param>
        /// <param name="maskfilename">掩膜文件路径</param>
        /// <param name="epsg">投影id</param>
        /// <returns></returns>
        IRasterMapNode Put(string key, string filename, string maskfilename, int epsg);

        /// <summary>
        /// 创建图源节点并返回图源节点
        /// </summary>
        /// <param name="key">图源节点关键词</param>
        /// <param name="groupImage">图源</param>
        /// <returns></returns>
        IRasterMapNode Put(string key);

        /// <summary>
        /// 移除节点
        /// </summary>
        /// <param name="key">图源节点关键词</param>
        void Remove(string key);
    }
}
